package com.whli.autumn.mall.web;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;

/**
 * <p></p>
 * @author whli
 * @version 1.0.0
 * @since 2019/9/21 22:09
 */
@SpringBootApplication(exclude = {
        SecurityAutoConfiguration.class,
        MongoAutoConfiguration.class
})
@ComponentScan({"com.whli.autumn"})
@MapperScan({"com.whli.autumn.**.mapper"})
public class AutumnMallApplication extends SpringBootServletInitializer {

    public static void main(String[] args) {
        SpringApplication.run(AutumnMallApplication.class,args);
    }

    /**
     * <p>支持War运行</p>
     * @param builder
     * @return
     */
    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
        return builder.sources(this.getClass());
    }

}
